package com.liushuai.eas.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.liushuai.eas.mapper.LessonMapper;
import com.liushuai.eas.pojo.Lesson;
import com.liushuai.eas.pojo.Timetable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

@Service
public class LessonImp implements LessonMapper {

    @Resource
    private LessonMapper lessonMapper;

    @Override
    public int insert(Lesson entity) {
        return lessonMapper.insert(entity);
    }

    @Override
    public int deleteById(Serializable id) {
        return lessonMapper.deleteById(id);
    }

    @Override
    public int deleteById(Lesson entity) {
        return lessonMapper.deleteById(entity);
    }

    @Override
    public int deleteByMap(Map<String, Object> columnMap) {
        return 0;
    }

    @Override
    public int delete(Wrapper<Lesson> queryWrapper) {
        return 0;
    }

    @Override
    public int deleteBatchIds(Collection<?> idList) {
        return 0;
    }

    @Override
    public int updateById(Lesson entity) {
        return lessonMapper.updateById(entity);
    }

    @Override
    public int update(Lesson entity, Wrapper<Lesson> updateWrapper) {
        return 0;
    }

    @Override
    public Lesson selectById(Serializable id) {
        return lessonMapper.selectById(id);
    }

    @Override
    public List<Lesson> selectBatchIds(Collection<? extends Serializable> idList) {
        return null;
    }

    @Override
    public List<Lesson> selectByMap(Map<String, Object> columnMap) {
        return null;
    }

    @Override
    public Lesson selectOne(Wrapper<Lesson> queryWrapper) {
        return lessonMapper.selectOne(queryWrapper);
    }

    @Override
    public Long selectCount(Wrapper<Lesson> queryWrapper) {
        return null;
    }

    @Override
    public List<Lesson> selectList(Wrapper<Lesson> queryWrapper) {
        return null;
    }

    @Override
    public List<Map<String, Object>> selectMaps(Wrapper<Lesson> queryWrapper) {
        return null;
    }

    @Override
    public List<Object> selectObjs(Wrapper<Lesson> queryWrapper) {
        return null;
    }

    @Override
    public <P extends IPage<Lesson>> P selectPage(P page, Wrapper<Lesson> queryWrapper) {
        return lessonMapper.selectPage(page, queryWrapper);
    }

    @Override
    public <P extends IPage<Map<String, Object>>> P selectMapsPage(P page, Wrapper<Lesson> queryWrapper) {
        return null;
    }

    @Override
    public List<Timetable> queryLessonList(int pageBegin, int pageEnd, int classroomId, int courseId, int classId, int teacherId, String year) {
        return lessonMapper.queryLessonList(pageBegin,pageEnd,classroomId,courseId,classId,teacherId,year);
    }

    @Override
    public int deleteTimetable(int courseId, int teacherId, int classId, int classroomId) {
        return lessonMapper.deleteTimetable(courseId,teacherId,classId,classroomId);
    }

    @Override
    public Lesson queryConflict(String year, int weeks, String week, String startTime, String endTime, int classroomId) {
        return lessonMapper.queryConflict(year,weeks,week,startTime,endTime,classroomId);
    }

    @Override
    public List<Lesson> queryClassLesson(int classId, int weeks, String year) {
        return lessonMapper.queryClassLesson(classId,weeks,year);
    }

    @Override
    public List<Lesson> queryTeacherLesson(int teacherId, int weeks, String year) {
        return lessonMapper.queryTeacherLesson(teacherId,weeks,year);
    }

    @Override
    public List<Map<String, Object>> queryClassCourse(int classId) {
        return lessonMapper.queryClassCourse(classId);
    }
}
